# Hero Statistics

> `GET /api/academy/heroes/{hero_identifier}/stats`: Academy endpoint of the Rone Arena API.

Retrieve performance statistics for a specific hero by rank. Supports query parameters for rank, pagination, and localization.

Path parameters:
- **hero_identifier**: Hero identifier as numeric hero ID or hero name. Accepts values like `30`, `Yi Sun-shin`, or `yisunshin`.

Query parameters:
- **rank**: Rank filter. Allowed values: `all`, `epic`, `legend`, `mythic`, `honor`, `glory`.
- **size**: Number of items per page (minimum: 1).
- **index**: Page index (starting from 1).
- **lang**: Language code for localized content (default: `en`).

The response includes hero statistics data:
- **records**: Array of hero entries, each containing:
    - **_id**: Unique record identifier.
    - **_createdAt**: Creation timestamp.
    - **_updatedAt**: Last update timestamp.
    - **data**:
        - **main_hero**:
            - **data**:
                - **hero**:
                    - **data**:
                        - **head**: Main hero portrait image URL.
                        - **name**: Main hero name.
        - **main_heroid**: Main hero ID.
        - **main_hero_appearance_rate**: Pick rate of the main hero.
        - **main_hero_ban_rate**: Ban rate of the main hero.
        - **main_hero_win_rate**: Win rate of the main hero.
        - **sub_hero**: Array of synergy heroes, each containing:
            - **heroid**: Hero ID.
            - **hero_win_rate**: Win rate of the synergy hero.
            - **hero_appearance_rate**: Pick rate of the synergy hero.
            - **increase_win_rate**: Positive synergy impact on win rate.
            - **min_win_rate6-20**: Win rate breakdown across match durations.
            - **hero**:
                - **data**:
                    - **hero**:
                        - **data**:
                            - **head**: Synergy hero portrait image URL.
        - **sub_hero_last**: Array of negative synergy heroes, each containing:
            - **heroid**: Hero ID.
            - **hero_win_rate**: Win rate of the sub-hero.
            - **hero_appearance_rate**: Pick rate of the sub-hero.
            - **increase_win_rate**: Negative impact on win rate.
            - **min_win_rate6-20**: Win rate breakdown across match durations.

This endpoint is useful for:
- Analyzing hero performance across different ranks.
- Understanding meta trends.
- Guiding players in hero selection and strategy.

## Request

`GET https://arena.rone.dev/api/academy/heroes/{hero_identifier}/stats`

### Parameters

| Name | In | Type | Required | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `hero_identifier` | path | string | yes |  | Hero identifier as numeric hero ID or hero name. Accepts values like `30`, `Yi Sun-shin`, or `yisunshin`. Name matching ignores spaces/symbols and is case-insensitive (e.g., `Luo Yi` to `luoyi`). |
| `rank` | query | string | no | `all` | Rank filter for hero statistics. One of: `all`, `epic`, `legend`, `mythic`, `honor`, `glory`. |
| `size` | query | integer | no | `20` | Number of items per page. Range: 1... |
| `index` | query | integer | no | `1` | Page index for pagination. Range: 1... |
| `lang` | query | string | no | `en` | Language code for localized content. One of: `en`, `id`, `ru`, `es`, `pt`, `tr`, `ar`, `de`, `fr`, `it`, `ja`, `ko`, `th`, `vi`, `zh-CN`, `zh-TW`, `km`. |

### Example

```bash
curl -X GET 'https://arena.rone.dev/api/academy/heroes/{hero_identifier}/stats'
```

## Example response

```json
{
  "code": 0,
  "message": "OK",
  "data": {
    "records": [
      {
        "_createdAt": 1725607499154,
        "_id": "66daae4baf5771f18c504066",
        "_updatedAt": 1774890906305,
        "data": {
          "bigrank": "101",
          "camp_type": "1",
          "main_hero": {
            "data": {
              "hero": {
                "data": {
                  "head": "https://wsrv.nl/?url=https%3A%2F%2Fakmweb.youngjoygame.com%2Fweb%2Fsvnres%2Fimg%2Fmlbb%2Fhomepage%2F100_3391df36d6dcc54dd1c417098e15ec59.png",
                  "name": "Fanny"
                }
              }
            }
          },
          "main_hero_appearance_rate": 0.007866,
          "main_hero_ban_rate": 0.042957,
          "main_hero_win_rate": 0.442515,
          "main_heroid": 17,
          "match_type": "1",
          "sub_hero": [
            {
              "hero": {
                "data": {
                  "hero": {
                    "data": {
                      "head": "https://wsrv.nl/?url=https%3A%2F%2Fakmweb.youngjoygame.com%2Fweb%2Fsvnres%2Fimg%2Fmlbb%2Fhomepage%2F100_da02742f59013365923b216420bc4082.png"
                    }
                  }
                }
              },
              "hero_appearance_rate": 0.007849,
              "hero_index": 1,
              "hero_win_rate": 0.540854,
              "heroid": 107,
              "increase_win_rate": 0.02013,
              "min_win_rate10_12": 0.5543,
              "min_win_rate12_14": 0.510571,
              "min_win_rate14_16": 0.479701,
              "min_win_rate16_18": 0.476889,
              "min_win_rate18_20": 0.474236,
              "min_win_rate20": 0.4885,
              "min_win_rate6": 0.79602,
              "min_win_rate6_8": 0.594158,
              "min_win_rate8_10": 0.660306
            }
          ],
          "sub_hero_last": [
            {
              "hero_appearance_rate": 0.002212,
              "hero_index": 1,
              "hero_win_rate": 0.473875,
              "heroid": 84,
              "increase_win_rate": -0.147216,
              "min_win_rate10_12": 0.116807,
              "min_win_rate12_14": 0.191547,
              "min_win_rate14_16": 0.253222,
              "min_win_rate16_18": 0.357298,
              "min_win_rate18_20": 0.410104,
              "min_win_rate20": 0.488372,
              "min_win_rate6": 0.312,
              "min_win_rate6_8": 0.137931,
              "min_win_rate8_10": 0.092857
            }
          ]
        },
        "id": 102827,
        "sourceId": 2755183
      }
    ],
    "total": 1
  }
}
```

## Links

- Try it in the playground: https://arena.rone.dev/web/academy/heroes/{hero_identifier}/stats
- Academy endpoints: https://arena.rone.dev/web/academy.md
- OpenAPI schema: https://arena.rone.dev/api/openapi.json
